public class code3 {
    // 力扣 150 两数之和II
    public int[] twoSum(int[] numbers, int target) {
        // 首先可以先尝试一下两个 for 循环可否实现
        // 虽然但是，超时了。。。
        int[] re = new int[2];

        for(int i = 0; i < numbers.length; i++) {
            int slow = i;
            int fast = slow + 1;
            while(fast < numbers.length) {
                if(numbers[slow] + numbers[fast] == target) {
                    re[0] = ++slow;
                    re[1] = ++fast;
                    return re;
                }
                fast++;
            }
        }
        return re;
    }
}
